package com.dayaokeji.rhythmschoolstudent.client.home.course.ranking.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.dayaokeji.rhythmschoolstudent.R;
import com.dayaokeji.server_api.domain.CourseTemplate;

/**
 * ********************************************************************
 * *  Created by Fei wo on 2018-12-5
 * ********************************************************************
 * *  version 1.0
 * ********************************************************************
 * *  Copyright (C) dayaokeji.com 2018 -- 2020 All rights reserved.
 * ********************************************************************
 * *
 * ********************************************************************
 */
public class FindCourseTemplateAdapter extends BaseQuickAdapter<CourseTemplate,BaseViewHolder> {

    public FindCourseTemplateAdapter() {
        super(R.layout.item_course_template);
    }

    @Override
    protected void convert(BaseViewHolder helper, CourseTemplate item) {
        helper.setText(R.id.course_name, item.getName())
                .setText(R.id.tv_teacher_name, mContext.getString(R.string.teacher_name,item.getTeacherName()))
                .setText(R.id.tv_join_code, mContext.getString(R.string.join_code,item.getId()));
    }
}
